home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Languguage OS 2
/
Languguage OS II Version 10-94 (Knowledge Media)(1994).ISO
/
gnu
/
libg_261.zip
/
libg_261
/
libg++
/
tests
/
tFix.exp
< prev
next >
Wrap
Text File
|
1992-05-06
|
2KB
|
71 lines
Fix: identities should be displayed
[X] displays the precision of a given value
[*] indicates that the full precision is not used for coding reasons
0 [16] = 0.00000 [16]
.5 [16] = 0.50000 [16]
-.5 [17] = -0.50000 [17]
.1 [33] = 0.10000 [33]
-.5 [17] = -0.50000 [17]
.3 [16] = 0.29999 [16]
.5 [16] = 0.50000 [16]
.1 [16] = 0.09998 [16]
.1 [33*] = 0.09998 [33]
-.2 [17] = -0.20001 [17]
-.5 [17] = -0.50000 [17]
.1 [16] == .1 [33*] = 1
.1 [16] == .1 [33] = 0
.1 [33] != .5 [16] = 1
.1 [33] > .5 [16] = 0
.1 [33] <= -.2 [17] = 0
1073741824 = 1.07374e+09
.5 = 0.5
.5 [17] = 0.50000 [17]
-.5 [17] = -0.50000 [17]
.1 [33] + .5 [16] = 0.60000 [33]
.1 [33] - .5 [16] = -0.40000 [33]
.1 [33] * .5 [16] = 0.05000 [49]
.1 [33] * 3 = 0.30000 [33]
.1 [33] * -3 = -0.30000 [33]
-.1 [33] * 3 = -0.30000 [33]
-.1 [33] * -3 = 0.30000 [33]
.5 [17] * -2 = -1.00000 [17]
.1 [33] % 25 = 0.10000 [58]
.1 [33] % -25 = 0.09375 [8]
.1 [33] / .5 [16] = 0.20001 [33]
.1 [33] << 1 = 0.20000 [33]
-.1 [33] >> 2 = 0.47500 [33]
abs(-.2) = 0.20001 [17]
abs(.2) = 0.20001 [17]
sgn(-.2) = -1
sgn(.2) = 1
show .1 [33]
len = 33
siz = 3
ref = 1
man = ccccccc8000
val = 0.1
Fix: range errors warned
Fix: range error in declaration
1.1 [16] = 0.00000 [16]
Fix: range error in division
.5 [16] / .1 [33] = 0.00000 [16]
Fix: range error in division -- division by zero
.5 [16] / 0. [16] = 0.00000 [16]
Fix: range error in multiply by int -- int too large
.5 [17] * 32768 = -1.00000 [17]
Fix: overflows saturated
.95 [16] + .1 [33] = 1.00000 [33]
-.1 [33] - .95 [16] = -1.00000 [33]
.5 [17] * 2 = 0.99998 [17]
Fix: overflows generate warnings
Fix: overflow warning
.95 [16] + .1 [33] = -0.94999 [33]
Fix: overflow warning
-.1 [33] - .95 [16] = 0.94999 [33]
Fix: overflow warning
.5 [17] * 2 = -0.49994 [17]